package com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.mapper;

import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.FlowTitleExpression;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: lzb
 * @date: 2021/11/9 17:04
 */
@Mapper
public interface FlowTitleExpressionDAO {

    /**
     * 批量添加自定义标题表达式
     *
     * @param flowTitleExpressionList
     * @return
     */
    int batchInsert(List<FlowTitleExpression> flowTitleExpressionList);

    /**
     * 解析主流程 自定义标题
     *
     * @param deployId 部署id
     * @return
     */
    FlowTitleExpression getFlowTitleExpressionByDeployId(@Param("deployId") String deployId);


    int insertFlowTitleExpression(FlowTitleExpression flowTitleExpression);


    List<FlowTitleExpression> getFlowTitleExpressionList(@Param("deployId") String deployId);

    int updateFlowTitleExpression(FlowTitleExpression flowTitleExpression);

    FlowTitleExpression getFlowTitleExpressionByDeployIdAndActivityId(@Param("deployId") String deployId, @Param("activityId") String activityId);

    FlowTitleExpression getFlowGlobalTitleExpressionByDeployId(@Param("deployId") String deployId);
}
